<?php

namespace MyBlog\Models;

use Illuminate\Database\Eloquent\Model;
use MyBlog\Libs\QiniuUtils;

class Member extends Model
{
    protected $guarded = array('id');
    
    public function imgUrl($dimension = null) {
    	$imgUrl = QiniuUtils::getUrl($this->img_path, $dimension);
    	return $imgUrl;
    }
    
    public function gender_ex() {
    	if($this->gender == 'm') {
    		$gender = '<font color="#94bced">♂</font>';
    	}elseif ($this->gender == 'f') {
    		$gender = '<font color="#f994ab">♀</font>';
    	}
    	return $gender;
    }
}
